using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace RiceShop.Models
{
    /// <summary>
    /// 营销活动实体类
    /// </summary>
    public class Promotion
    {
        /// <summary>
        /// 活动ID
        /// </summary>
        [Key]
        public long Id { get; set; }

        /// <summary>
        /// 活动标题
        /// </summary>
        [Required]
        [StringLength(100)]
        public string Title { get; set; } = string.Empty;

        /// <summary>
        /// 活动banner图
        /// </summary>
        [Required]
        [StringLength(500)]
        public string Banner { get; set; } = string.Empty;

        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime StartTime { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime EndTime { get; set; }

        /// <summary>
        /// 活动状态（0:未开始,1:进行中,2:已结束,3:已下架）
        /// </summary>
        public byte Status { get; set; }

        /// <summary>
        /// 状态标签
        /// </summary>
        [StringLength(20)]
        public string? StatusTag { get; set; }

        /// <summary>
        /// 活动规则（JSON格式）
        /// </summary>
        public string? Rules { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdateTime { get; set; }

        /// <summary>
        /// 是否删除
        /// </summary>
        public bool IsDeleted { get; set; }
    }
} 